//根级别的state mutations getters
export const state = {
    //用户信息初始值
    //如果本地存储有存info，初始值就是本地存储的数据
    //如果本地存储没存info，初始值就是{}
    info: sessionStorage.getItem("info") ? JSON.parse(sessionStorage.getItem("info")) : {}
}
export const getters = {
    //导出用户信息
    info(state) {
        return state.info
    }
}
export const mutations = {
    //修改用户逻辑
    changeInfo(state, info) {
        state.info = info
    }
}